using System;
using System.Runtime.Serialization;

namespace AsNum.MySecret.Entity.Database {    
	/// <summary>
	/// Table : dbo.User
	/// 注册用户
	/// </summary>
	[Serializable]
	[DataContract]
    public class UserEntity {

			

		
		/// <summary>
		/// 用户自动编号
		/// dbo.User.UserID
		/// </summary>
		[DataMember]
		public int UserID{
			get;set;
		}
					

		
		/// <summary>
		/// 登陆名
		/// dbo.User.LoginName
		/// </summary>
		[DataMember]
		public string LoginName{
			get;set;
		}
					

		
		/// <summary>
		/// 显示名
		/// dbo.User.ShowName
		/// </summary>
		[DataMember]
		public string ShowName{
			get;set;
		}
					

		
		/// <summary>
		/// 密码
		/// dbo.User.Pwd
		/// </summary>
		[DataMember]
		public string Pwd{
			get;set;
		}
					

		
		/// <summary>
		/// 注册邮箱
		/// dbo.User.Email
		/// </summary>
		[DataMember]
		public string Email{
			get;set;
		}
					

		
		private DateTime createTime = new DateTime();
		/// <summary>
		/// 创建时间
		/// dbo.User.CreateTime
		/// 默认值(getdate())
        /// </summary>
		[DataMember]
		public DateTime CreateTime{
			get{
				return createTime;
			}
			set{
				createTime = value;
			}
		}
					

		
		/// <summary>
		/// 注册IP
		/// dbo.User.RegistIP
		/// </summary>
		[DataMember]
		public long RegistIP{
			get;set;
		}
					

		
		/// <summary>
		/// 最近登陆IP
		/// dbo.User.LastLoginIP
		/// </summary>
		[DataMember]
		public long LastLoginIP{
			get;set;
		}
					

		
		/// <summary>
		/// 最近登陆时间
		/// dbo.User.LastLoginTime
		/// </summary>
		[DataMember]
		public DateTime LastLoginTime{
			get;set;
		}
					

		
		/// <summary>
		/// 最后一次登陆失败的IP
		/// dbo.User.LoginFailedIP
		/// </summary>
		[DataMember]
		public long LoginFailedIP{
			get;set;
		}
					

		
		/// <summary>
		/// 最后一次登陆失败的时间
		/// dbo.User.LoginFailedTime
		/// </summary>
		[DataMember]
		public DateTime LoginFailedTime{
			get;set;
		}
					

		
		private int loginFailedCount = 0;
		/// <summary>
		/// 失败次数,成功登陆后，清除这个数字，过了限制时间，清除这个次数
		/// dbo.User.LoginFailedCount
		/// 默认值((0))
        /// </summary>
		[DataMember]
		public int LoginFailedCount{
			get{
				return loginFailedCount;
			}
			set{
				loginFailedCount = value;
			}
		}
					

		
		private byte status = 1;
		/// <summary>
		/// 0:禁用，1:未激活, 2:正常 3:自动锁定 4:手工锁定
		/// dbo.User.Status
		/// 默认值((1))
        /// </summary>
		[DataMember]
		public byte Status{
			get{
				return status;
			}
			set{
				status = value;
			}
		}
			
	}
}
